-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New repeated_measures_d()
#618
Conversation
also rename type -> method
@bwiernik I also added some unicode subscript letters just for you ;) library(effectsize)
data("sleep")
sleep2 <- reshape(sleep, direction = "wide",
idvar = "ID", timevar = "group")
repeated_measures_d(Pair(extra.1, extra.2) ~ 1, data = sleep2, method = "av")
#> d (av) | 95% CI
#> -----------------------
#> -0.76 | [-1.13, -0.39]
#>
#> - Adjusted for small sample bias.
options(es.use_symbols = TRUE)
repeated_measures_d(Pair(extra.1, extra.2) ~ 1, data = sleep2, method = "av")
#> dₐᵥ | 95% CI
#> ----------------------
#> -0.76 | [-1.13, -0.39]
#>
#> - Adjusted for small sample bias. |
Codecov Report
@@ Coverage Diff @@
## main #618 +/- ##
==========================================
+ Coverage 90.55% 90.74% +0.18%
==========================================
Files 56 57 +1
Lines 3419 3564 +145
==========================================
+ Hits 3096 3234 +138
- Misses 323 330 +7
|
R/repeated_measures_d.R
Outdated
|
||
d <- (m - mu) / s | ||
se <- sqrt( | ||
(df / (df - 2)) * (m_V / (s^2)) + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so I think this (df/(df-2))
term is a small sample correction factor that seems to be applied broadly (i have seen it in other SE equations too). It probably does not matter all that much, but it might be good to stay consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but I don't feel comfortable making that change myself 😅😳
Alright thanks @MatthewBJane ! |
This PR introduces the new
repeated_measures_d()
function, thanks to the help of @bwiernik and @MatthewBJane (#372).It can be installed via:
The function is fully documented (but @bwiernik and @MatthewBJane feel free to suggest edits), with an addition to existing SMD vignette, and
effectsize(<t.test(paired = TRUE)>)
support.Demo of new functionality:
Created on 2023-11-07 with reprex v2.0.2